<!doctype html>
<html class="no-js">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<title>首页</title>
<meta name="description" content="">
<meta name="keywords" content="">
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no">
<meta name="renderer" content="webkit">
<meta http-equiv="Cache-Control" content="no-transform"/>
<meta http-equiv="Cache-Control" content="no-siteapp" />
<link rel="stylesheet" type="text/css" href="http://apps.bdimg.com/libs/blendui/2.0.0/boost.min.css" />
<link rel="stylesheet" type="text/css" href="__PUBLIC__/acshenzhen/css/doc.css" />
<script type="text/javascript" src="__PUBLIC__/acshenzhen/js/jquery-1.8.3.min.js"></script>
<script type="text/javascript" src="http://apps.bdimg.com/libs/blendui/2.0.0/boost.min.js"></script>
<script type="text/javascript">window.boost = $.noConflict(true);</script>
</head>
<body class="bg-grey">
<div class="user-info bg-blue">
	<figure class="blend-picture blend-picture-default blend-picture-circle" style="margin:0;"> <a calss="picture-link"> <img src="{$avatar}"> </a>
		<figcaption class="blend-picture-title blend-picture-title-default">
			<h4 class="f-2x">
                            <notempty name='member_info'>
                                {$member_info.name}
                                <else/>
                                用户
                            </notempty>
                            </h4>
			<p class="f-1x">你还没有考试过</p>
		</figcaption>
	</figure>
	<div class="bar">
		<div class="info-bar"></div>
	</div>
</div>
<div class="user-form">
	<form action="{:U('M/Acshenzhen/exam_enter_for')}" method="post"  class="bg-white clearfix">
		<div class="blend-formgroup">
			<label class="blend-formgroup-label f-2x">学校</label>
			<input type="text" class="blend-formgroup-input" name="school" value="{$school_name}" readonly="readonly" />
		
		</div>
            <div class="blend-formgroup">
			<label class="blend-formgroup-label f-2x">年级</label>
			<select id="grade_id" class="blend-formgroup-select" name="grade_id" required="required">
				<option value="1">一年级</option>
				<option value="2">二年级</option>
				<option value="3">三年级</option>
				<option value="4">四年级</option>
				<option value="5">五年级</option>
				<option value="6">六年级</option>
			</select>
		</div>
		<div class="blend-formgroup">
			<label class="blend-formgroup-label f-2x">班级</label>
			<select id="class_id" class="blend-formgroup-select" name="class_id" required="required">
				<option value="1">一班</option>
				<option value="2">二班</option>
				<option value="3">三班</option>
				<option value="4">四班</option>
				<option value="5">五班</option>
				<option value="6">六班</option>
				<option value="7">七班</option>
				<option value="8">八班</option>
				<option value="9">九班</option>
				<option value="10">十班</option>
			</select>
		</div>
		
		<div class="blend-formgroup">
			<label class="blend-formgroup-label f-2x">姓名</label>
                        <input type="text" class="blend-formgroup-input" value="{$member_info.name}" name="name" required="required" placeholder="请输入姓名"/>
		</div>
		<input id="grade_name" type="text" name="grade" value="" hidden="hidden" />
		<input id="class_name" type="text" name="class" value="" hidden="hidden" />
		<input type="text" name="schoolid" value="{$schoolid}" hidden="hidden"/>
		<button class="submit blend-button blend-button-yellow blend-button-large">开始考试</button>
		<div class="tips f-1x">温馨提示：一共20道选择题，每道题5分，考试时间不限。</div>
                <a href="{:U('exam_learn',array('schoolid'=>$schoolid))}" class="submit blend-button blend-button-yellow blend-button-large">磨刀不误砍柴工,先来学习呗</a>
	</form>
</div>
<script type="text/javascript">
$(document).ready(function(){
	$("#grade_id").bind('change',function(){
		var grade_name = $(this).find("option:selected").text();
		// alert(grade_name);
		$("#grade_name").val(grade_name);
	});
	$("#class_id").bind('change',function(){
		var class_name = $(this).find("option:selected").text();
		// alert(class_name);
		$("#class_name").val(class_name);
	});
});
</script>

<script src="http://res.wx.qq.com/open/js/jweixin-1.0.0.js"></script>
<script>
wx.config({
    debug: false,
    appId: '{$signPackage["appId"]}',
    timestamp: {$signPackage["timestamp"]},
    nonceStr: '{$signPackage["nonceStr"]}',
    signature: '{$signPackage["signature"]}',
    jsApiList: [
      // 所有要调用的 API 都要加到这个列表中
      'onMenuShareTimeline',
      'onMenuShareAppMessage'
    ]
});


wx.ready(function () {
// 在这里调用 API
    wx.onMenuShareTimeline({
        title: '“深圳食品小卫士”大比拼，一大波萌娃究竟花落谁家', // 分享标题
        link: "{$site_url}{:U('M/Acshenzhen/xws_rank')}", // 分享链接
        imgUrl: 'http://www.zhongcetianxia.com/Public/template/default/img/acshenzhen/share_icon.jpg', // 分享图标
        success: function () { 
            // 用户确认分享后执行的回调函数，生成红包
            // _system.$("cover").click()

        },
        cancel: function () { 
            // 用户取消分享后执行的回调函数
        }
    });
    
    wx.onMenuShareAppMessage({
        title: '“深圳食品小卫士”大比拼，一大波萌娃究竟花落谁家', // 分享标题
        desc: '众测天下召集食品安全小卫士啦，一起参与领奖品', // 分享描述
        link: "{$site_url}{:U('M/Acshenzhen/xws_rank')}", // 分享链接
        imgUrl: 'http://www.zhongcetianxia.com/Public/template/default/img/acshenzhen/share_icon.jpg', // 分享图标
        type: '', // 分享类型,music、video或link，不填默认为link
        dataUrl: '', // 如果type是music或video，则要提供数据链接，默认为空
        success: function () { 
            // 用户确认分享后执行的回调函数
            // _system.$("cover").click()

        },
        cancel: function () { 
            // 用户取消分享后执行的回调函数
        }
    });

});
</script>
</body>
</html>